package com.yanxu.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author 折戟沉沙铁未销
 * @version V1.0
 * @date 2025-09-25-2025
 * @Description: RestTemplate 配置类
 */
@Configuration
public class RestTemplateConfiguration {

    @Bean
    @LoadBalanced  //使 RestTemplate 具备负载均衡的能力
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}